package com.dz.reflect;

public class ReflectDemo01 {
    public static void main(String[] args) throws ClassNotFoundException {
        //通过类之间拿到字节码
        Class c = Dog.class;
        System.out.println(c);
        // 通过对象拿到字节
        Dog dog = new Dog();
        Class c1 = dog.getClass();
        System.out.println(c1);
        // 通过Class.forName拿到字节码
        Class c2 = Class.forName("com.dz.reflect.Dog");
        System.out.println(c2);

    }
}
